<template>
	<view style="padding: 30rpx;">
		<view
			style="padding: 0 30rpx ;height: 200rpx;border-radius: 16rpx;display: flex;align-items: center;background-color: #fff;">
			<view>
				<image src="../../static/logo.png" style="height: 150rpx;width: 150rpx;border-radius: 50%;"></image>
			</view>
			<view style="margin-left: 30rpx;">
				<view style="font-size: 32rpx;">{{transportationCompany}}</view>
				<view style="margin-top: 20rpx;">{{loginUser.username}}</view>
			</view>
		</view>
		<view style="margin-top: 50rpx;border-radius: 16rpx;background-color: #fff;">
			<!-- <u-cell-item title="个人信息" @click="toInfo()"></u-cell-item> -->
			<u-cell-item title="司机姓名" :value="driverInfo.name"></u-cell-item>
			<u-cell-item title="司机电话" :value="driverInfo.phone"></u-cell-item>
		</view>
		<view style="margin-top: 20rpx;border-radius: 16rpx;background-color: #fff;">
			<u-cell-item title="退出登录" @click="logout()"></u-cell-item>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loginUser: '',
				driverInfo:''
			}
		},
		onLoad() { 
			this.loginUser = getApp().globalData.loginUser
			this.driverInfo = getApp().globalData.driverInfo
			this.transportationCompany =  getApp().globalData.transportationCompany.name
		},
		methods: {
			logout() { 
				uni.removeStorageSync('pasword');
				uni.removeStorageSync('username')
				uni.reLaunch({ 
					url: "/pages/login/login"
				})
			},

			toInfo() {
				uni.navigateTo({
					url: "/pages/mine/info/info"
				})
			}
		}
	}
</script>

<style>

</style>